<?php /* Smarty version Smarty-3.1.13, created on 2014-08-22 22:51:24
         compiled from "D:\webphp\YiVa\templates\admin\file\fileedit.tpl" */ ?>
<?php /*%%SmartyHeaderCode:691753f5fe9e919fa5-91741180%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '68d82318b2ad9a4e934b81fbd3f4b3f39659d157' => 
    array (
      0 => 'D:\\webphp\\YiVa\\templates\\admin\\file\\fileedit.tpl',
      1 => 1408719081,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '691753f5fe9e919fa5-91741180',
  'function' => 
  array (
  ),
  'version' => 'Smarty-3.1.13',
  'unifunc' => 'content_53f5fe9e98ae12_11759058',
  'variables' => 
  array (
    'openfilepath' => 0,
    'filecontent' => 0,
    'path' => 0,
    'folders' => 0,
    'folder' => 0,
    'files' => 0,
    'file' => 0,
  ),
  'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_53f5fe9e98ae12_11759058')) {function content_53f5fe9e98ae12_11759058($_smarty_tpl) {?><?php echo $_smarty_tpl->getSubTemplate ("admin/header.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
 <?php echo $_smarty_tpl->getSubTemplate ("admin/navibar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
 <?php echo $_smarty_tpl->getSubTemplate ("admin/sidebar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>


<<script type="text/javascript">
<!--
	function save(){
		$.ajax({
	        type: "POST",
	        url: 'admin/fileedit/savefile',
	       	data: $("#dataform").serialize(),
	        success:function(data){
		        if(data == 1){
		        	 $.layer({
		                 area : ['auto','auto'],
		                 dialog : {msg:'文件修改成功!',type : 0}
		             });
		        }
		    },
	        error: function () {
	        }
	    });
	}
//-->
</script>
<link href="<?php echo @constant('WEBSITE_URL');?>
public/assets/pagedown/demo.css"
	rel="stylesheet">
 <script src="<?php echo @constant('WEBSITE_URL');?>
public/assets/layer/layer.min.js"></script>
<div class="content">

	<div class="header">
		<div class="stats">
			<p class="stat">
				<!--span class="number"></span-->
			</p>
		</div>
		<h1 class="page-title">系统文件修改</h1>
	</div>

	<div class="container-fluid">
		<div class="row-fluid">
			<div class="bb-alert alert alert-info" style="display: none;">
				<span>操作成功</span>
			</div>
			<div id="myTabContent" class="tab-content">
				<!-- 实际写文章内容的布局开始 -->
				<div class="row-fluid">
					<div class="alert alert-success span9" id="p_tip">
						<p>
						 	注:由于冲突.$textarea 代表为html的textarea标签.. 
						</p>
						<p>
						 	<strong>当前文件:</strong><?php echo $_smarty_tpl->tpl_vars['openfilepath']->value;?>

						</p>
					</div>
					<div class="container-fluid">
						<div class="span9">
						<form id="dataform">
							<input class="input-medium"
								type="text" placeholder="title" name="openfilepath"   value='<?php echo $_smarty_tpl->tpl_vars['openfilepath']->value;?>
'
								id="openfilepath" style="display: none;"> 
							<div class="p">
								<textarea id="wmd-input" class="textarea-14" name="text"
									tabindex="2"  rows="15"><?php echo $_smarty_tpl->tpl_vars['filecontent']->value;?>
</textarea>
							</div>
						</form>
							
						</div>
						<div class="span3 well ">
							<div class="p">
								<h3>
									<i class="icon-th-list"></i>文件列表
								</h3>
								<ul>
								 <li><a href='admin/fileedit/index?type=0&path=<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
'>.....</a></li>
								 <?php  $_smarty_tpl->tpl_vars['folder'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['folder']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['folders']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['folder']->key => $_smarty_tpl->tpl_vars['folder']->value){
$_smarty_tpl->tpl_vars['folder']->_loop = true;
?>
              						 <li><a href="admin/fileedit/index?type=0&name=<?php echo $_smarty_tpl->tpl_vars['folder']->value;?>
&path=<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['folder']->value;?>
</a></li>
            					 <?php } ?>
								 <?php  $_smarty_tpl->tpl_vars['file'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['file']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['files']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['file']->key => $_smarty_tpl->tpl_vars['file']->value){
$_smarty_tpl->tpl_vars['file']->_loop = true;
?>
									 <li><a href="admin/fileedit/index?type=1&name=<?php echo $_smarty_tpl->tpl_vars['file']->value;?>
&path=<?php echo $_smarty_tpl->tpl_vars['path']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['file']->value;?>
</a></li>
            					 <?php } ?>
								</ul>
							</div>


							<button class="btn btn-large btn-primary" type="button" onclick="save()"
								id="p_publish">保存</button>
						</div>
						<!-- Modal -->
						<!-- Modal end -->

					</div>
				</div>

				<!-- 实际写文章内容的布局结束-->
			</div>
		</div>
		<!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
		<?php echo $_smarty_tpl->getSubTemplate ("admin/footer.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>
<?php }} ?>